#ifndef __UART_H_
#define __UART_H_
#include <stdio.h>
#include <stdint.h>
#define UART1_BASE_ADDR 0x02020000
#define UART1_URXD      (*(volatile uint32_t *)(UART1_BASE_ADDR + 0x00))
#define UART1_UTXD      (*(volatile uint32_t *)(UART1_BASE_ADDR + 0x40))
#define UART1_UCR1      (*(volatile uint32_t *)(UART1_BASE_ADDR + 0x80))
#define UART1_UCR2      (*(volatile uint32_t *)(UART1_BASE_ADDR + 0x84))
#define UART1_UCR3      (*(volatile uint32_t *)(UART1_BASE_ADDR + 0x88))
#define UART1_UFCR      (*(volatile uint32_t *)(UART1_BASE_ADDR + 0x90))
#define UART1_USR1      (*(volatile uint32_t *)(UART1_BASE_ADDR + 0x94))
#define UART1_USR2      (*(volatile uint32_t *)(UART1_BASE_ADDR + 0x98))
#define UART1_UBIR      (*(volatile uint32_t *)(UART1_BASE_ADDR + 0xA4))
#define UART1_UBMR      (*(volatile uint32_t *)(UART1_BASE_ADDR + 0xA8))
void uart_puts(const char *str);
void uart_init(void);
extern int printf(const char *format, ...);
#endif

